﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AFT
{
    
class NetworkState
{

    public struct NetstateInfo
    {
        public string protocol { get; set; }
        public string recvQ { get; set; }
        public string sendQ { get; set; }
        public string localaddr { get; set; }
        public string foreignaddr { get; set; }
        public string state { get; set; }
    }

    public List<NetstateInfo> networkstateinformation;

    public NetworkState()
    {
        networkstateinformation = new List<NetstateInfo>();
    }

    public void addNetworkState(    string protocol,
                                    string recvQ,
                                    string sendQ,
                                    string localaddr,
                                    string foreignaddr,
                                    string state        )
    {

        NetstateInfo newNetstate = new NetstateInfo();

        newNetstate.protocol = protocol;
        newNetstate.recvQ = recvQ;
        newNetstate.sendQ = sendQ;
        newNetstate.localaddr = localaddr;
        newNetstate.foreignaddr = foreignaddr;
        newNetstate.state = state;


        networkstateinformation.Add(newNetstate);

    }

    public int getNumberOfDiskInfo()
    {
        return networkstateinformation.Count;
    }
}
}

